package com.itheima.web.controller;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("/user")//一级请求URL路径（指定模块）
public class UserController {

    /*
    * method:表示指出使用何种方式的请求Get，Post以及其他
    * params:表示必须带参数name=admin
    * */
    @RequestMapping(value = "/findAll",method = RequestMethod.GET,params = {"name=admin"})
    //@RequestMapping("/findAll")
    public String findAll() {
        System.out.println("1111");
        return "error";
    }
    @RequestMapping("/update")
    public String update(){
        System.out.println("update...");
        return "success";
    }
}
